﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NanjingbeiRailwayStation.Data.ClickHouse.Models
{
    /// <summary>
    /// 
    /// </summary>
    public class MeterChartTrendReponse
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="meterChartTrends"></param>
        public MeterChartTrendReponse(List<MeterChartTrend> meterChartTrends)
        {
            imei = meterChartTrends.Select(item => item.imei).ToList();
            eventTime = meterChartTrends.Select(item => item.eventTime.ToString("yyyy-MM-dd HH:mm")).ToList();

            Real_UA = meterChartTrends.Select(item => item.Real_UA).ToList();

            Real_UB = meterChartTrends.Select(item => item.Real_UB).ToList();
            Real_UC = meterChartTrends.Select(item => item.Real_UC).ToList();

            Real_IA = meterChartTrends.Select(item => item.Real_IA).ToList();

            Real_IB = meterChartTrends.Select(item => item.Real_IB).ToList();

            Real_IC = meterChartTrends.Select(item => item.Real_IC).ToList();


            Real_TA = meterChartTrends.Select(item => item.Real_TA).ToList();
            Real_TB = meterChartTrends.Select(item => item.Real_TB).ToList();
            Real_TC = meterChartTrends.Select(item => item.Real_TC).ToList();

            Real_TN = meterChartTrends.Select(item => item.Real_TN).ToList();


            Real_LD = meterChartTrends.Select(item => item.Real_LD).ToList();

            YGGL_P = meterChartTrends.Select(item => item.YGGL_P).ToList();
            YGGL_PA = meterChartTrends.Select(item => item.YGGL_PA).ToList();
            YGGL_PB = meterChartTrends.Select(item => item.YGGL_PB).ToList();
            YGGL_PC = meterChartTrends.Select(item => item.YGGL_PC).ToList();

            WGGL_Q = meterChartTrends.Select(item => item.WGGL_Q).ToList();
            WGGL_QA = meterChartTrends.Select(item => item.WGGL_QA).ToList();
            WGGL_QB = meterChartTrends.Select(item => item.WGGL_QB).ToList();
            WGGL_QC = meterChartTrends.Select(item => item.WGGL_QC).ToList();

            ActiveEnergyImportInPhaseL = meterChartTrends.Select(item => item.ActiveEnergyImportInPhaseL).ToList();
            

            ActiveEnergyImportInPhaseL1 = meterChartTrends
                .Select(item => item.ActiveEnergyImportInPhaseL1).ToList();
            ActiveEnergyImportInPhaseL2 = meterChartTrends
               .Select(item => item.ActiveEnergyImportInPhaseL2).ToList();
            ActiveEnergyImportInPhaseL3 = meterChartTrends
               .Select(item => item.ActiveEnergyImportInPhaseL3).ToList();
        }

        /// <summary>
        /// 产品编号
        /// </summary>
        public List<string> imei { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public List<string> eventTime { get; set; }

        /// <summary>
        /// 电压
        /// </summary>
        public List<double> Real_UA { get; set; }
        /// <summary>
        /// 电压
        /// </summary>

        public List<double> Real_UB { get; set; }
        /// <summary>
        /// 电压
        /// </summary>
        public List<double> Real_UC { get; set; }
        /// <summary>
        /// 电流
        /// </summary>
        public List<double> Real_IA { get; set; }
        /// <summary>
        /// 电流
        /// </summary>
        public List<double> Real_IB { get; set; }
        /// <summary>
        /// 电流
        /// </summary>
        public List<double> Real_IC { get; set; }
        /// <summary>
        ///  温度
        /// </summary>
        public List<double> Real_TA { get; set; }
        /// <summary>
        ///  温度
        /// </summary>
        public List<double> Real_TB { get; set; }
        /// <summary>
        ///  温度
        /// </summary>
        public List<double> Real_TC { get; set; }
        /// <summary>
        ///  温度
        /// </summary>
        public List<double> Real_TN { get; set; }
        /// <summary>
        ///  漏电量
        /// </summary>
        public List<double> Real_LD { get; set; }

        /// <summary>
        /// 有功功率
        /// </summary>
        public List<double> YGGL_P { get; set; }
        /// <summary>
        /// 有功功率
        /// </summary>
        public List<double> YGGL_PA { get; set; }
        /// <summary>
        /// 有功功率
        /// </summary>
        public List<double> YGGL_PB { get; set; }
        /// <summary>
        /// 有功功率
        /// </summary>
        public List<double> YGGL_PC { get; set; }
        /// <summary>
        /// 无功功率
        /// </summary>
        public List<double> WGGL_Q { get; set; }
        /// <summary>
        /// 无功功率
        /// </summary>
        public List<double> WGGL_QA { get; set; }
        /// <summary>
        /// 无功功率
        /// </summary>
        public List<double> WGGL_QB { get; set; }
        /// <summary>
        /// 无功功率
        /// </summary>
        public List<double> WGGL_QC { get; set; }
        /// <summary>
        ///  总电量 ActiveEnergyImportInPhaseL
        /// </summary>
        public List<double> ActiveEnergyImportInPhaseL { get; set; }
        /// <summary>
        ///  总电量
        /// </summary>
        public List<double> ActiveEnergyImportInPhaseL1 { get; set; }
        /// <summary>
        ///  总电量
        /// </summary>
        public List<double> ActiveEnergyImportInPhaseL2 { get; set; }
        /// <summary>
        ///  总电量
        /// </summary>
        public List<double> ActiveEnergyImportInPhaseL3 { get; set; }
    }
}
